package cn.learn.controller.system.log;

import cn.learn.base.BaseController;
import cn.learn.service.system.log.LogService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/system/log")
public class LogController extends BaseController {

    @Autowired
    private LogService logService;

    /**
     * 分页展示日志
     * @return
     */
    @RequestMapping("/list")
    public String list(@RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "10") int pageSize) {
        PageInfo resultData = logService.selectAllByPage(pageNum, pageSize, companyId);
        request.setAttribute("pageList", resultData);
        return "/system/log/log-list";
    }

}
